package cn.tedu.cinema.information.controller;

import cn.tedu.cinema.base.response.JsonResult;
import cn.tedu.cinema.information.pojo.dto.InformationQuery;
import cn.tedu.cinema.information.pojo.vo.InformationVO;
import cn.tedu.cinema.information.service.InformationService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/v1/information")
@Slf4j
public class InformationController {
    @Autowired
    InformationService informationService;
    @RequestMapping("/select")
    public JsonResult select(InformationQuery informationQuery){
        log.debug("查询参数:informationQuery{}",informationQuery);
        List<InformationVO> list = informationService.select(informationQuery);
        return JsonResult.ok(list);
    }
}
